#ifndef WIDGET_H
#define WIDGET_H
#include <QtSerialPort/QtSerialPort>
#include <QWidget>



QT_BEGIN_NAMESPACE
namespace Ui {
class Widget;
}
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

//定义槽函数
private slots:
    void TimerEvent();

    void on_pushButton_clicked();

private:
    Ui::Widget *ui;
    QTimer* timer;
    QStringList portNameList;
    QSerialPort* serial;
};
#endif // WIDGET_H
